<template>
  <div class="content">
    <ul>
      <li v-for="(item, i) in list" :key="i">
        <p class="title">
          {{ item.cate2Info[0].cate2Name }}
        </p>
        <div v-for="(item, i) in item.list" :key="i">
          <img :src="item.roomSrc" alt="" />
          <p>
            {{ item.nickname }}
          </p>
          <p>{{ item.roomName }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  props: {
    list: {
      type: Array,
      defalut: () => {
        return [];
      },
    },
  },
};
</script>
<style lang="scss" scoped>
li {
  margin-top: .7rem;
  display: flex;
  flex-wrap: wrap;
  height: 5rem;
  justify-content: space-around;
  align-items: center;
  position: relative;
  padding-right: .2rem;
  .title {
    width: 100%;
    text-align: left;
    position: absolute;
    top: 0;
    left: 0.4rem;
  }
  div:nth-of-type(3),
  div:nth-of-type(4) {
      margin-top: .2rem;
  }
  div {
    width: 48%;
    height: 50%;
    margin-top: 0.4rem;
    text-indent: 0.05rem;
    position: relative;
    img {
      width: 3.6rem;
      border-radius: 0.2rem;
    }
    P:nth-of-type(1) {
      position: absolute;
      bottom: 0.6rem;
      text-indent: 0.5rem;
      color: white;
      background: url("https://shark2.douyucdn.cn/front-publish/m-douyu-v3-master/assets/images/iconfont-wo_fdcada2.png")
        no-repeat;
      background-size: 0.3rem;
      background-position: 0.2rem 0;
      font-size: 0.24rem;
    }
    p:nth-of-type(2) {
      font-size: 0.24rem;
      text-align: left;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
    }
  }
}
</style>